package com.hq.service.impl;

import com.hq.mapper.RootMapper;
import com.hq.model.Root;
import com.hq.service.RootService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 登录
 */
@Service
public class RootServiceImpl implements RootService {
    @Autowired
    RootMapper rootMapper;

    @Override
    public Root getUsernameAndPasswordAndRole(String username, String password, String role) {
        return rootMapper.getUsernameAndPasswordAndRole (username,password,role);
    }

    @Override
    public Root getUsername(String username) {
        return rootMapper.getUsername (username);
    }

    @Override
    public void addRegister(Root root) {
        rootMapper.addRegister(root);
    }
}
